package generic;

import generic.bean.Amphibian;
import generic.bean.Vehicle;

import java.util.ArrayList;

/**
 * 构建复杂的泛型组合
 * @param <A>
 * @param <B>
 * @param <C>
 * @param <D>
 */
public class TupleList<A,B,C,D> extends ArrayList<Tuple.Tuple4<A,B,C,D>> {
    public static void main(String[] args) {
        TupleList<Vehicle, Amphibian,String,Integer> list = new TupleList<>();
        list.add(new Tuple.Tuple4<>(new Vehicle(),new Amphibian(),"",1));
        list.add(new Tuple.Tuple4<>(new Vehicle(),new Amphibian(),"",2));
        list.forEach(System.out::println);
    }
}
